<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><link rel="stylesheet" type="text/css" href="style.css">
<title>Welcome to Test Page</title>
</head>
<body>
<h1>Welcome to <strong>Test Page</strong></h1>
<h5>Please Enter Your Credentials.  </h5>
<form name="loginUser" action="Login.do" method="post" onsubmit="return validateForm();">
<table border="0">
                    <tr>
                        <th> Email Address  : </th><th> <input name="loginEmail" size=50 type="text" /> </th> 
                    </tr>
                    <tr>
                        <th> Password  : </th><th> <input name="password" size=50 type="password" /> </th> 
                    </tr>
                </table>
                <br></br>
                <INPUT TYPE="SUBMIT" VALUE="Submit">
                </form>
                <h1></h1>
                
               New User? <a href="Register.html">Register here</a>
              <pre></pre><a href="ForgotPassword.jsp">Forgot Password?</a>

<script>
function validateForm()
{
	var x=document.forms["loginUser"]["loginEmail"].value;
	var atpos=x.indexOf("@");
	var dotpos=x.lastIndexOf(".");
	if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Not a valid e-mail address");
  return false;
  }
if (x==null || x=="")
  { 
  alert("Please Enter Your Email Address");
  return false;
  }        
var x=document.forms["loginUser"]["password"].value;
if ( x=="" || x==null) 
  { 
  alert("Please Enter Your Password");
  return false;
  }
}
</script>
</body>
</html>